import {useDispatch} from "react-redux"
function useToast(){
  let dispatch = useDispatch()
  return (type:ToastType,message:string)=>{
    dispatch({
      type:"toast_show",
      value:{
        type:type,
        message:message
      }
    })
  }
}
function useToast1(){
  let dispatch = useDispatch()
  return (type:ToastType,message:string)=>{
    dispatch({
      type:"toast_show",
      value:{
        type:type,
        message:message
      }
    })
  }
}

export {useToast,useToast1}